//
//  ZLPMyTableViewCell.m
//  TangYi
//
//  Created by dllo on 15/10/27.
//  Copyright (c) 2015年 赵连鹏. All rights reserved.
//

#import "ZLPMyTableViewCell.h"

@implementation ZLPMyTableViewCell

- (void)dealloc {
    [_picView release];
    [_titleLable release];
    [_likeView release];
    [_countLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.picView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.picView];
    [_picView release];
    
    self.titleLable = [[UILabel alloc] init];
    [self.picView addSubview:self.titleLable];
    [_titleLable release];
    
    self.likeView = [[UIImageView alloc] init];
    [self.picView addSubview:self.likeView];
    [_likeView release];
    
    self.countLabel = [[UILabel alloc] init];
    [self.picView addSubview:self.countLabel];
    [_countLabel release];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.picView.frame = CGRectMake(0, 5, self.contentView.frame.size.width, self.contentView.frame.size.height - 10);
    
    self.titleLable.frame = CGRectMake(10, self.contentView.frame.size.height - 40, 280, 20);
    self.titleLable.textColor = [UIColor whiteColor];
    
    self.likeView.frame = CGRectMake(self.contentView.frame.size.width - 50, 10, 30, 30);
    
    self.countLabel.frame = CGRectMake(self.contentView.frame.size.width - 63, 40, 60, 20);
    self.countLabel.textAlignment = NSTextAlignmentCenter;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
